package com.naicheng.ivote;
import com.naicheng.ivote.doman.UserInfo;
import com.naicheng.ivote.utils.MyPreferences;

import android.app.Application;

public class MyApplication extends Application {
	
	private MyPreferences preference;
	public static UserInfo user;
	@Override
	public void onCreate() {
		preference = MyPreferences.getPrefer(this);
		getUserInfo();
		super.onCreate();
	}
	
	private void getUserInfo(){
		user = new UserInfo();
		user.userid = preference.getString("userid", "");
		user.accound = preference.getString("accound", "");
		user.password = preference.getString("password", "");
		user.sex = preference.getString("sex", "");
		System.out.println("用户信息已写入");
	}

}
